#!/usr/bin/python3
# -*- coding:utf-8 -*- 
import paddlehub as hub
import cv2

def animal_classify(file_path):
    module = hub.Module(name="resnet50_vd_animals")
    np_images = [cv2.imread(file_path)]
    results = module.classification(images=np_images)
    if len(results) is not None:
        result_list = []
        for result in results:
            for key in result.keys():
                result_list.append(key)
        return result_list
    else:
        return None

if __name__ == '__main__':
    kind = animal_classify("./picture/3.jpg")
    print(kind)